Skip to content

RDKEMW-17624: Fixed potential causes of plugin crash#303

Merged
bpunnuru merged 1 commit intodevelopfrom
topic/RDKEMW-17624
Apr 29, 2026
Merged

RDKEMW-17624: Fixed potential causes of plugin crash#303
bpunnuru merged 1 commit intodevelopfrom
topic/RDKEMW-17624

Conversation

@gururaajar
Copy link
Copy Markdown
Contributor

Reason for Change: Fixed potential causes of plugin crash
Test Procedure: Monitor for networkmanager plugin crash
Priority: P1
Risks: Medium

Reason for Change: Fixed potential causes of plugin crash
Test Procedure: Monitor for networkmanager plugin crash
Priority: P1
Risks: Medium
Signed-off-by: Gururaaja ESR<Gururaja_ErodeSriranganRamlingham@comcast.com>
Copilot AI review requested due to automatic review settings April 29, 2026 02:58
@gururaajar gururaajar requested a review from a team as a code owner April 29, 2026 02:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses potential NetworkManager plugin crashes by improving thread-safety around default-interface handling, adding defensive nullptr checks around iterator creation, and tightening GLib/libnm lifecycle management to avoid cross-thread GObject mutation.

Changes:

  • Protect default-interface state with a mutex and route reads/writes through getDefaultInterface() / setDefaultInterface().
  • Add platform_deinit() and invoke it during shutdown to release platform-specific resources (notably libnm/GLib objects on GNOME).
  • Add nullptr checks after RPC iterator creation to avoid dereferencing invalid iterators.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/l2Test/libnm/l2_test_libnmproxy.cpp Fixes a gmock expectation chain / minor formatting cleanup.
plugin/rdk/NetworkManagerRDKProxy.cpp Uses locked default-interface accessors; adds iterator nullptr checks; adds platform_deinit().
plugin/gnome/gdbus/NetworkManagerGdbusProxy.cpp Uses locked default-interface accessors; adds iterator nullptr checks; adds platform_deinit().
plugin/gnome/NetworkManagerGnomeWIFI.cpp Improves error handling/cleanup in WPS flow; adds scan error handling.
plugin/gnome/NetworkManagerGnomeProxy.cpp Replaces global NMClient with instance state; isolates libnm client on a private GMainContext; adds cleanup in platform_deinit() and iterator nullptr checks.
plugin/NetworkManagerJsonRpc.cpp Adds nullptr checks for created iterators before invoking backend APIs.
plugin/NetworkManagerImplementation.h Introduces mutex-protected default-interface getters/setters; adds forward decls for libnm/GLib types; adds platform_deinit() declaration.
plugin/NetworkManagerImplementation.cpp Calls platform_deinit() on shutdown; uses default-interface accessors; adds iterator nullptr checks.
plugin/NetworkManagerConnectivity.cpp Switches default-interface access to mutex-protected accessor and refactors connectivity-check branching for consistency.
legacy/LegacyWiFiManagerAPIs.cpp Adds nullptr checks for created iterators.
legacy/LegacyNetworkAPIs.cpp Adds nullptr checks for created iterators.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugin/rdk/NetworkManagerRDKProxy.cpp
@bpunnuru bpunnuru merged commit 5118cb4 into develop Apr 29, 2026
20 of 21 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants